omega=[1.0285 2.0569 3.0854 4.1138 5.1423 6.1707 7.1992 8.2276 9.2561 10.2845 11.3130 12.3414 13.3699 14.3983 15.4268 16.4552];
A=[0.2961 0.02774 2.5978e-3 2.4333e-4 2.2788e-5 2.1345e-6 1.9989e-7 1.8724e-8 1.7535e-9 1.6425e-10 1.5382e-11 1.4408e-12 1.3493e-13 1.2639e-14 1.1836e-15 1.1087e-16];
B=[6625.9782 2.4675e6 919.39e6 342.37e9 127.57e12 47.506e15 17.701e18 6.5917e21 2.4561e24 914.64e24 340.8e27 126.91e30 47.288e33 17.610e36 6.5615e39 2.4434e42];
E=[5.9207e-4 7.161e-3 2.4653e-2 5.095e-2 8.1869e-2 0.1153 0.1515 0.192 0.2386 0.2931 0.3560 0.4266 0.5027 0.5808 0.6566 0.7263];

hold on
filter=zeros(1,257);
for i=1:16
    for m=1:257
        w=(2*pi*5512.5*(m-1))/256;
        k=warp(w);
        if k < (omega(i)-2.5)
            filter(m)=0;
        elseif (k>=(omega(i)-2.5)) & (k<=(omega(i)-0.5))
            filter(m)=A(i)*E(i)*10^k;
        elseif (k>(omega(i)-0.5)) & (k<(omega(i)+0.5))
            filter(m)=E(i);
        elseif (k>=(omega(i)+0.5)) & (k<=(omega(i)+1.3))
            filter(m)=B(i)*E(i)*10^(-2.5*k);
        elseif k > (omega(i)+1.3)
            filter(m)=0;
        else
            erro
        end
    end
    plot(filter, '.')
end
